#include <stdio.h>
#define MAX 255
int main() {
    int a[MAX][MAX];
    int i, j, n;
    scanf("%d", &n);

    for (i = 0; i <= n; i++) {
        a[i][0] = 1;
        for (j = 0; j <= n; j++) {
            a[i][j] = 1;
        }
    }
    for (i = 2; i <= n; i++) {
        for (j = 0; j < i - 1; j++) {
            a[i][j] = a[i - 1][j - 1] + a[i - 1][j];
        }
    }
    for (i = 0; i <= n; i++) {
        for (j = 0; j < i; j++) {
            printf("%d ", a[i][j]);
        }
        printf("\n");
    }
    return 0;
}
